Package-level declarations

Types

Link copied to clipboard
open class Client(clientInfo: Implementation, options: ClientOptions = ClientOptions()) : Protocol<ClientRequest, ClientNotification, ClientResult>

An MCP client on top of a pluggable transport.

Link copied to clipboard
class ClientOptions(val capabilities: ClientCapabilities = ClientCapabilities(), var enforceStrictCapabilities: Boolean = true) : ProtocolOptions

Options for configuring the MCP client.

Link copied to clipboard
class SSEClientTransport(client: HttpClient, urlString: String?, reconnectionTime: Duration? = null, requestBuilder: HttpRequestBuilder.() -> Unit = {}) : Transport

Client transport for SSE: this will connect to a server using Server-Sent Events for receiving messages and make separate POST requests for sending messages.

Link copied to clipboard

A transport implementation for JSON-RPC communication that leverages standard input and output streams.

Link copied to clipboard
class WebSocketClientTransport(client: HttpClient, urlString: String?, requestBuilder: HttpRequestBuilder.() -> Unit = {}) : WebSocketMcpTransport

Client transport for WebSocket: this will connect to a server over the WebSocket protocol.

Functions

Link copied to clipboard
suspend fun HttpClient.mcpSse(urlString: String? = null, reconnectionTime: Duration? = null, requestBuilder: HttpRequestBuilder.() -> Unit = {}): Client

Creates and connects an MCP client over SSE using the provided HttpClient.

Link copied to clipboard
fun HttpClient.mcpSseTransport(urlString: String? = null, reconnectionTime: Duration? = null, requestBuilder: HttpRequestBuilder.() -> Unit = {}): SSEClientTransport

Returns a new SSE transport for the Model Context Protocol using the provided HttpClient.

Link copied to clipboard
suspend fun HttpClient.mcpWebSocket(urlString: String? = null, requestBuilder: HttpRequestBuilder.() -> Unit = {}): Client

Creates and connects an MCP client over WebSocket using the provided HttpClient.

Link copied to clipboard
fun HttpClient.mcpWebSocketTransport(urlString: String? = null, requestBuilder: HttpRequestBuilder.() -> Unit = {}): WebSocketClientTransport

Returns a new WebSocket transport for the Model Context Protocol using the provided HttpClient.